package com.zwu.util;


import com.zwu.vo.ResultVo;

/**
 * @Author: Zyl
 * @Param:
 * @return:
 * @Description:返回结果信息工具  对应于控制层的返回数据结果
 */
public class ResultVoUtil {
    public static ResultVo success(Object data){
        ResultVo resultVo=new ResultVo();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        resultVo.setData(data);
        return resultVo;
    }
    public static ResultVo fail(Object data){
        ResultVo resultVo=new ResultVo();
        resultVo.setCode(1);
        resultVo.setMsg("失败");
        resultVo.setData(data);
        return resultVo;
    }
}
